package com.ruoyi.project.business.mapper;

import com.ruoyi.project.business.domain.BusinessArea;
import com.ruoyi.project.business.domain.BusinessAreaOrder;

import java.util.List;

/**
 * 租地土地Mapper接口
 * 
 * @author ruoyi
 * @date 2020-10-19
 */
public interface BusinessAreaMapper 
{
    /**
     * 查询租地土地
     * 
     * @param id 租地土地ID
     * @return 租地土地
     */
    public BusinessArea selectBusinessAreaById(Long id);

    /**
     * 查询租地土地列表
     * 
     * @param businessArea 租地土地
     * @return 租地土地集合
     */
    public List<BusinessArea> selectBusinessAreaList(BusinessArea businessArea);

    /**
     * 新增租地土地
     * 
     * @param businessArea 租地土地
     * @return 结果
     */
    public int insertBusinessArea(BusinessArea businessArea);

    /**
     * 修改租地土地
     * 
     * @param businessArea 租地土地
     * @return 结果
     */
    public int updateBusinessArea(BusinessArea businessArea);

    /**
     * 删除租地土地
     * 
     * @param id 租地土地ID
     * @return 结果
     */
    public int deleteBusinessAreaById(Long id);

    /**
     * 批量删除租地土地
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteBusinessAreaByIds(Long[] ids);

    /**
     * 修改土地状态(租期已经到了的土地)
     * @return
     */
    int updateBusinessAreaStatus(Long  areaId);

    /**查询最新过期的土地
     * @return
     */
    List<BusinessAreaOrder> selectBusinessAreaOrder();
}
